Skip to content
This repository has been archived by the owner on Oct 22, 2021. It is now read-only.

js-git-ipld <-> pando library #53

Closed
wants to merge 9 commits into from
Closed

js-git-ipld <-> pando library #53

wants to merge 9 commits into from

Conversation

corydickson
Copy link
Contributor

Looking for some feedback on this approach before I deprecate IPLD functions inside of script.js

Todo:

  • Convert from Commit class back into IPLD format.
  • Use this lib for state management

Resolves #50

@corydickson corydickson requested a review from osarrouy April 30, 2019 13:51
fix promise
}
}

public async fetchModifiedTree(): Promise<void> {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I came upon this solution given that we couldn't traverse the tree inside the constructor

@@ -156,3 +141,25 @@ const fetchFilesFromTree = (hash, path) => {
})
})
}

const fetchOrderedHistory = async (hash, formerHistory) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the final version of this PR, we'll deprecate all of these helper functions in this file and import them from pando.ts

Copy link
Member

@osarrouy osarrouy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey ! I added a couple of comment. Also I think the best would be to:

  1. split this lib into its own package. We may need to use it in other places [especially in the GraphProtocol reducer if we come up with one]
  2. Write test to make sure of the consistency of the lib. The best would be extract a known IPLD commit history build with pando and, in the test, push it to IPFS and then try to fetch it again / update it. Otherwise i think it will be super tricky to test the behaviour of the lib each time we update it.

author: IAuthorOrCommitter
committer: IAuthorOrCommitter
message: string
parents: ITree[] | null
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it supposed to be : parents: ILinkedCommitData[] ?

add test

remove coverage

remove duplicate
@osarrouy
Copy link
Member

Closing for now since we need to figure out an answer to #50 before ... Will re-open later if needed ...

@osarrouy osarrouy closed this May 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pando.js
2 participants